<?php 
session_start();
header("Content-type:text/html;charst=utf-8");
require_once __DIR__.'/class/api.user.php';
require_once __DIR__."/lib/conf.php";
$db = require_once __DIR__."/lib/db.php"; 
require_once __DIR__."/class/api.webList.php";

$db->exec("set names utf8");
 
 
        
$path = isset($_SERVER["PATH_INFO"])?explode("/", $_SERVER["PATH_INFO"]):explode("/", $_SERVER["QUERY_STRING"]);
 
 
        
switch ($path[1]) {
	case 'user':
		$user = new User($db);
		$user->run();
		break;
	
	case 'web':
		$web = new webList($db);
		$web->run();
		break;


	default:
		# code...
		break;
}

 ?>